package com.dianping.cat.core.config;

import java.util.List;
import org.unidal.dal.jdbc.AbstractDao;
import org.unidal.dal.jdbc.DalException;
import org.unidal.dal.jdbc.Readset;
import org.unidal.dal.jdbc.Updateset;

public class BusinessConfigDao
  extends AbstractDao {
/* 11 */   public BusinessConfig createLocal() { return new BusinessConfig(); }





/* 17 */   public int deleteByPK(BusinessConfig proto) throws DalException { return getQueryEngine().deleteSingle(BusinessConfigEntity.DELETE_BY_PK, proto); }



  
  public List<BusinessConfig> findByName(String name, Readset<BusinessConfig> readset) throws DalException {
/* 23 */     BusinessConfig proto = new BusinessConfig();

/* 25 */     proto.setName(name);

/* 27 */     return getQueryEngine().queryMultiple(BusinessConfigEntity.FIND_BY_NAME, proto, readset);
  }





  
  public BusinessConfig findByPK(int keyId, Readset<BusinessConfig> readset) throws DalException {
/* 36 */     BusinessConfig proto = new BusinessConfig();

/* 38 */     proto.setKeyId(keyId);

/* 40 */     return (BusinessConfig)getQueryEngine().querySingle(BusinessConfigEntity.FIND_BY_PK, proto, readset);
  }





  
  public BusinessConfig findByNameDomain(String name, String domain, Readset<BusinessConfig> readset) throws DalException {
/* 49 */     BusinessConfig proto = new BusinessConfig();

/* 51 */     proto.setName(name);
/* 52 */     proto.setDomain(domain);

/* 54 */     return (BusinessConfig)getQueryEngine().querySingle(BusinessConfigEntity.FIND_BY_NAME_DOMAIN, proto, readset);
  }







  
/* 64 */   protected Class<?>[] getEntityClasses() { return new Class[] { BusinessConfigEntity.class }; }



/* 68 */   public int insert(BusinessConfig proto) throws DalException { return getQueryEngine().insertSingle(BusinessConfigEntity.INSERT, proto); }





/* 74 */   public int updateByPK(BusinessConfig proto, Updateset<BusinessConfig> updateset) throws DalException { return getQueryEngine().updateSingle(BusinessConfigEntity.UPDATE_BY_PK, proto, updateset); }






/* 81 */   public int updateBaseConfigByDomain(BusinessConfig proto, Updateset<BusinessConfig> updateset) throws DalException { return getQueryEngine().updateSingle(BusinessConfigEntity.UPDATE_BASE_CONFIG_BY_DOMAIN, proto, updateset); }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-core-3.0.0.jar!/com/dianping/cat/core/config/BusinessConfigDao.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */